﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BrandonHaynes.Data
	{
	static class Extensions
		{
		public static IEnumerable<T> ToEnumerable<T>(this T value)
			{ yield return value; }

		public static int? ToNullable(this int value)
			{ return value == -1 ? null : (int?)value; }

		public static DateTime? ToNullable(this DateTime value)
			{ return value == DateTime.MinValue ? null : (DateTime?)value; }
		}
	}
